import { Rule } from "./types";

export const EmptyBlocksRuleList: Rule[] = [
    {
        id: "EmptyCatchBlock",
        descEn: "Reports empty catch blocks. Empty catch blocks indicate that an exception is ignored and not handled. In case exceptions are ignored intentionally, this should be made explicit by using the specified names in the allowedExceptionNameRegex.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [
            {
                param: "allowedExceptionNameRegex",
                descEn: "ignores exception types which match this regex",
                descCn: "",
                defaultValue: "_|(ignore|expected).*"
            }
        ],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptycatchblock",
    },
    {
        id: "EmptyClassBlock",
        descEn: "Reports empty classes. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyclassblock",
    },
    {
        id: "EmptyDefaultConstructor",
        descEn: "Reports empty default constructors. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptydefaultconstructor",
    },
    {
        id: "EmptyDoWhileBlock",
        descEn: "Reports empty do/while loops. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptydowhileblock",
    },
    {
        id: "EmptyElseBlock",
        descEn: "Reports empty else blocks. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyelseblock",
    },
    {
        id: "EmptyFinallyBlock",
        descEn: "Reports empty finally blocks. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyfinallyblock",
    },
    {
        id: "EmptyForBlock",
        descEn: "Reports empty for loops. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyforblock",
    },
    {
        id: "EmptyFunctionBlock",
        descEn: `Reports empty functions. Empty blocks of code serve no purpose and should be removed. This rule will not report functions with the override modifier that have a comment as their only body contents (e.g., a // no-op comment in an unused listener function).

        Set the ignoreOverridden parameter to true to exclude all functions which are overriding other functions from the superclass or from an interface (i.e., functions declared with the override modifier).`,
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [
            {
                param: "ignoreOverridden",
                descEn: "Excludes all the overridden functions",
                descCn: "",
                defaultValue: false,
            }
        ],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyfunctionblock",
    },
    {
        id: "EmptyIfBlock",
        descEn: "Reports empty if blocks. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyifblock",
    },
    {
        id: "EmptyInitBlock",
        descEn: "Reports empty init expressions. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyinitblock",
    },
    {
        id: "EmptyKtFile",
        descEn: "Reports empty Kotlin (.kt) files. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptyktfile",
    },
    {
        id: "EmptySecondaryConstructor",
        descEn: "https://detekt.dev/docs/rules/empty-blocks#emptysecondaryconstructor",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptysecondaryconstructor",
    },
    {
        id: "EmptyTryBlock",
        descEn: "Reports empty try blocks. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptytryblock",
    },
    {
        id: "EmptyWhenBlock",
        descEn: "Reports empty when expressions. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptywhenblock",
    },
    {
        id: "EmptyWhileBlock",
        descEn: "Reports empty while expressions. Empty blocks of code serve no purpose and should be removed.",
        descCn: "",
        active: true,
        debt: "5min",
        paramList: [],
        url: "https://detekt.dev/docs/rules/empty-blocks#emptywhileblock",
    },
];